﻿#pragma once
#ifndef XL_XEXPAND_MOUSEKEY_HELP_H
#define XL_XEXPAND_MOUSEKEY_HELP_H 

//生成键盘消息lParam
inline DWORD X_Keyboard_GenerateMessagelParam(
	short int RepeatCount,
	UINT scCode,
	bool isFunc,
	bool bContext,
	bool lastStatus,
	bool TransitionalState ) {
	DWORD ret = scCode<<16;
	ret = ret| RepeatCount;
	if (isFunc) {
		ret |= 1<< 24;
	}
	if (bContext) {
		ret |= 1 << 29;
	}
	if (lastStatus) {
		ret |= 1 << 30;
	}
	if (TransitionalState) {
		ret |= 1 << 31;
	}
	return ret;
};

#endif
